import request from '@/utils/request'

// 查询搜索量记录列表
export function listSearch(query) {
  return request({
    url: '/system/search/list',
    method: 'get',
    params: query
  })
}

// 查询搜索量记录详细
export function getSearch(searchId) {
  return request({
    url: '/system/search/' + searchId,
    method: 'get'
  })
}

// 新增搜索量记录
export function addSearch(data) {
  return request({
    url: '/system/search',
    method: 'post',
    data: data
  })
}

// 修改搜索量记录
export function updateSearch(data) {
  return request({
    url: '/system/search',
    method: 'put',
    data: data
  })
}

// 删除搜索量记录
export function delSearch(searchId) {
  return request({
    url: '/system/search/' + searchId,
    method: 'delete'
  })
}

// 查询柱状图、饼状图信息
export function listSearchBar(query) {
  return request({
    url: '/system/search/bar',
    method: 'get',
    params: query
  })
}
